package com.unbook.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("s_user")
public class User {
    @JsonProperty("uId")
    @TableId(value = "u_id", type = IdType.NONE)
    private String uId;
    @JsonProperty("sId")
    @TableField("s_id")
    private String sId;
    @TableField("openid")
    private String openid;
    @TableField("unionid")
    private String unionid;
    @TableField(value = "session_key", select = false)
    private String sessionKey;
    @TableField("name")
    private String name;
    @TableField("head_url")
    private String headUrl;
    @TableField("phone")
    private Long phone;
    @TableField("create_time")
    private Date createTime;
    @TableField("update_time")
    private Date updateTime;
    @TableField(value = "status", fill = FieldFill.INSERT)
    private Integer status;

    @TableField(exist = false)
    private School school;
}
